package com.intelligencesoft.pss.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.intelligencesoft.pss.dao.UserInfoDao;
import com.intelligencesoft.pss.entity.base.UserInfo;

@Service
public class UserInfoService {

	@Autowired
	private UserInfoDao userInfoDao;
	
	public UserInfo saveUserInfo(UserInfo userInfo){
		userInfoDao.getHibernateTemplate().saveOrUpdate(userInfo);
		return userInfo;
	}
	
	public List<UserInfo> findByUserInfoList() {
		List<UserInfo> userInfoList = userInfoDao.getHibernateTemplate().loadAll(UserInfo.class);
		return userInfoList;
	}
}
